package com.zzyl;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import org.junit.Test;

import java.util.Map;


/**
 * TODO
 *
 * @Author XS
 * @Date 2025/10/22 10:41
 */

public class testHutoolHttp {


   @Test
    public void testPostForLogin(){
        Map<String, String> requestParamMap = Map.of("username", "admin"
                , "password", "admin"
                , "code", "3", "uuid", "870a4b9bfc28413a92f95f2b45fb491a");

        String jsonStr = JSONUtil.toJsonStr(requestParamMap);

        String login = HttpUtil.post("http://localhost:8080/login", jsonStr);


        System.out.println( login);
    }

}
